package com.situ.water_user.mapper;

import com.situ.water_user.pojo.UsMeter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Angel
 * @since 2020-12-01
 */
@Mapper
public interface UsMeterMapper extends BaseMapper<UsMeter> {
    @Select("select * from Us_meter where userNo=#{value}")
    public UsMeter queryByUserNo(String userNo);

    @Update("update US_meter set meterNo=#{meterNo},meterName=#{meterName}," +
            "startValue=#{startValue},meterTypeID=#{meterTypeID},aperture=#" +
            "{aperture},maxValue=#{maxValue},setupDate=#{setupDate},factory=#{factory} where userNo=#{userNo}")
    public void hbMeter(UsMeter meter);

}
